<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="lib/vue.js"></script>
	</head>
	<body>
		<div id="demo">{{fullName}}</div>
	</body>
	<script type="text/javascript">
		var demo=new Vue({
			el:'#demo',
			data:{
				firstName:'Li',
				lastName:'Huizhen'
			},
			computed:{
				fullName:{
					get:function(){
						return this.firstName+' '+this.lastName
					},
					set:function(newValue){
						var names=newValue.split(' ')
						this.firstName=names[0]
						this.lastName=names[names.length-1]
					}
				}
			}
		});
		console.log(demo.firstName);
	</script>
</html>
